3.551 \(\int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^{3/2}} \, dx\)

Optimal. Leaf size=138 \[ -\frac {(c-d) (c+7 d) \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{2 \sqrt {2} a^{3/2} f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a \sin (e+f x)+a)^{3/2}}+\frac {d (c-5 d) \cos (e+f x)}{2 a f \sqrt {a \sin (e+f x)+a}} \]

[Out]

-1/2*(c-d)*cos(f*x+e)*(c+d*sin(f*x+e))/f/(a+a*sin(f*x+e))^(3/2)-1/4*(c-d)*(c+7*d)*arctanh(1/2*cos(f*x+e)*a^(1/
2)*2^(1/2)/(a+a*sin(f*x+e))^(1/2))/a^(3/2)/f*2^(1/2)+1/2*(c-5*d)*d*cos(f*x+e)/a/f/(a+a*sin(f*x+e))^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.22, antiderivative size = 138, normalized size of antiderivative = 1.00, number of steps used = 4, number of rules used = 4, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.148, Rules used = {2760, 2751, 2649, 206} \[ -\frac {(c-d) (c+7 d) \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a \sin (e+f x)+a}}\right )}{2 \sqrt {2} a^{3/2} f}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a \sin (e+f x)+a)^{3/2}}+\frac {d (c-5 d) \cos (e+f x)}{2 a f \sqrt {a \sin (e+f x)+a}} \]

Antiderivative was successfully verified.

[In]

Int[(c + d*Sin[e + f*x])^2/(a + a*Sin[e + f*x])^(3/2),x]

[Out]

-((c - d)*(c + 7*d)*ArcTanh[(Sqrt[a]*Cos[e + f*x])/(Sqrt[2]*Sqrt[a + a*Sin[e + f*x]])])/(2*Sqrt[2]*a^(3/2)*f)
+ ((c - 5*d)*d*Cos[e + f*x])/(2*a*f*Sqrt[a + a*Sin[e + f*x]]) - ((c - d)*Cos[e + f*x]*(c + d*Sin[e + f*x]))/(2
*f*(a + a*Sin[e + f*x])^(3/2))

Rule 206

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(1*ArcTanh[(Rt[-b, 2]*x)/Rt[a, 2]])/(Rt[a, 2]*Rt[-b, 2]), x]
 /; FreeQ[{a, b}, x] && NegQ[a/b] && (GtQ[a, 0] || LtQ[b, 0])

Rule 2649

Int[1/Sqrt[(a_) + (b_.)*sin[(c_.) + (d_.)*(x_)]], x_Symbol] :> Dist[-2/d, Subst[Int[1/(2*a - x^2), x], x, (b*C
os[c + d*x])/Sqrt[a + b*Sin[c + d*x]]], x] /; FreeQ[{a, b, c, d}, x] && EqQ[a^2 - b^2, 0]

Rule 2751

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_.) + (d_.)*sin[(e_.) + (f_.)*(x_)]), x_Symbol] :> -Simp[(d
*Cos[e + f*x]*(a + b*Sin[e + f*x])^m)/(f*(m + 1)), x] + Dist[(a*d*m + b*c*(m + 1))/(b*(m + 1)), Int[(a + b*Sin
[e + f*x])^m, x], x] /; FreeQ[{a, b, c, d, e, f, m}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] &&  !LtQ[m,
-2^(-1)]

Rule 2760

Int[((a_) + (b_.)*sin[(e_.) + (f_.)*(x_)])^(m_)*((c_) + (d_.)*sin[(e_.) + (f_.)*(x_)])^2, x_Symbol] :> Simp[((
b*c - a*d)*Cos[e + f*x]*(a + b*Sin[e + f*x])^m*(c + d*Sin[e + f*x]))/(a*f*(2*m + 1)), x] + Dist[1/(a*b*(2*m +
1)), Int[(a + b*Sin[e + f*x])^(m + 1)*Simp[a*c*d*(m - 1) + b*(d^2 + c^2*(m + 1)) + d*(a*d*(m - 1) + b*c*(m + 2
))*Sin[e + f*x], x], x], x] /; FreeQ[{a, b, c, d, e, f}, x] && NeQ[b*c - a*d, 0] && EqQ[a^2 - b^2, 0] && LtQ[m
, -1]

Rubi steps

\begin {align*} \int \frac {(c+d \sin (e+f x))^2}{(a+a \sin (e+f x))^{3/2}} \, dx &=-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}-\frac {\int \frac {-\frac {1}{2} a \left (c^2+5 c d-2 d^2\right )+\frac {1}{2} a (c-5 d) d \sin (e+f x)}{\sqrt {a+a \sin (e+f x)}} \, dx}{2 a^2}\\ &=\frac {(c-5 d) d \cos (e+f x)}{2 a f \sqrt {a+a \sin (e+f x)}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}+\frac {((c-d) (c+7 d)) \int \frac {1}{\sqrt {a+a \sin (e+f x)}} \, dx}{4 a}\\ &=\frac {(c-5 d) d \cos (e+f x)}{2 a f \sqrt {a+a \sin (e+f x)}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}-\frac {((c-d) (c+7 d)) \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,\frac {a \cos (e+f x)}{\sqrt {a+a \sin (e+f x)}}\right )}{2 a f}\\ &=-\frac {(c-d) (c+7 d) \tanh ^{-1}\left (\frac {\sqrt {a} \cos (e+f x)}{\sqrt {2} \sqrt {a+a \sin (e+f x)}}\right )}{2 \sqrt {2} a^{3/2} f}+\frac {(c-5 d) d \cos (e+f x)}{2 a f \sqrt {a+a \sin (e+f x)}}-\frac {(c-d) \cos (e+f x) (c+d \sin (e+f x))}{2 f (a+a \sin (e+f x))^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C]  time = 0.34, size = 239, normalized size = 1.73 \[ \frac {\left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right ) \left ((1+i) (-1)^{3/4} \left (c^2+6 c d-7 d^2\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^2 \tanh ^{-1}\left (\left (\frac {1}{2}+\frac {i}{2}\right ) (-1)^{3/4} \left (\tan \left (\frac {1}{4} (e+f x)\right )-1\right )\right )+2 (c-d)^2 \sin \left (\frac {1}{2} (e+f x)\right )-(c-d)^2 \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )-4 d^2 \cos \left (\frac {1}{2} (e+f x)\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^2+4 d^2 \sin \left (\frac {1}{2} (e+f x)\right ) \left (\sin \left (\frac {1}{2} (e+f x)\right )+\cos \left (\frac {1}{2} (e+f x)\right )\right )^2\right )}{2 f (a (\sin (e+f x)+1))^{3/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(c + d*Sin[e + f*x])^2/(a + a*Sin[e + f*x])^(3/2),x]

[Out]

((Cos[(e + f*x)/2] + Sin[(e + f*x)/2])*(2*(c - d)^2*Sin[(e + f*x)/2] - (c - d)^2*(Cos[(e + f*x)/2] + Sin[(e +
f*x)/2]) + (1 + I)*(-1)^(3/4)*(c^2 + 6*c*d - 7*d^2)*ArcTanh[(1/2 + I/2)*(-1)^(3/4)*(-1 + Tan[(e + f*x)/4])]*(C
os[(e + f*x)/2] + Sin[(e + f*x)/2])^2 - 4*d^2*Cos[(e + f*x)/2]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2 + 4*d^2
*Sin[(e + f*x)/2]*(Cos[(e + f*x)/2] + Sin[(e + f*x)/2])^2))/(2*f*(a*(1 + Sin[e + f*x]))^(3/2))

________________________________________________________________________________________

fricas [B]  time = 0.45, size = 380, normalized size = 2.75 \[ -\frac {\sqrt {2} {\left ({\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right )^{2} - 2 \, c^{2} - 12 \, c d + 14 \, d^{2} - {\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right ) - {\left (2 \, c^{2} + 12 \, c d - 14 \, d^{2} + {\left (c^{2} + 6 \, c d - 7 \, d^{2}\right )} \cos \left (f x + e\right )\right )} \sin \left (f x + e\right )\right )} \sqrt {a} \log \left (-\frac {a \cos \left (f x + e\right )^{2} + 2 \, \sqrt {2} \sqrt {a \sin \left (f x + e\right ) + a} \sqrt {a} {\left (\cos \left (f x + e\right ) - \sin \left (f x + e\right ) + 1\right )} + 3 \, a \cos \left (f x + e\right ) - {\left (a \cos \left (f x + e\right ) - 2 \, a\right )} \sin \left (f x + e\right ) + 2 \, a}{\cos \left (f x + e\right )^{2} - {\left (\cos \left (f x + e\right ) + 2\right )} \sin \left (f x + e\right ) - \cos \left (f x + e\right ) - 2}\right ) - 4 \, {\left (4 \, d^{2} \cos \left (f x + e\right )^{2} + c^{2} - 2 \, c d + d^{2} + {\left (c^{2} - 2 \, c d + 5 \, d^{2}\right )} \cos \left (f x + e\right ) + {\left (4 \, d^{2} \cos \left (f x + e\right ) - c^{2} + 2 \, c d - d^{2}\right )} \sin \left (f x + e\right )\right )} \sqrt {a \sin \left (f x + e\right ) + a}}{8 \, {\left (a^{2} f \cos \left (f x + e\right )^{2} - a^{2} f \cos \left (f x + e\right ) - 2 \, a^{2} f - {\left (a^{2} f \cos \left (f x + e\right ) + 2 \, a^{2} f\right )} \sin \left (f x + e\right )\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="fricas")

[Out]

-1/8*(sqrt(2)*((c^2 + 6*c*d - 7*d^2)*cos(f*x + e)^2 - 2*c^2 - 12*c*d + 14*d^2 - (c^2 + 6*c*d - 7*d^2)*cos(f*x
+ e) - (2*c^2 + 12*c*d - 14*d^2 + (c^2 + 6*c*d - 7*d^2)*cos(f*x + e))*sin(f*x + e))*sqrt(a)*log(-(a*cos(f*x +
e)^2 + 2*sqrt(2)*sqrt(a*sin(f*x + e) + a)*sqrt(a)*(cos(f*x + e) - sin(f*x + e) + 1) + 3*a*cos(f*x + e) - (a*co
s(f*x + e) - 2*a)*sin(f*x + e) + 2*a)/(cos(f*x + e)^2 - (cos(f*x + e) + 2)*sin(f*x + e) - cos(f*x + e) - 2)) -
 4*(4*d^2*cos(f*x + e)^2 + c^2 - 2*c*d + d^2 + (c^2 - 2*c*d + 5*d^2)*cos(f*x + e) + (4*d^2*cos(f*x + e) - c^2
+ 2*c*d - d^2)*sin(f*x + e))*sqrt(a*sin(f*x + e) + a))/(a^2*f*cos(f*x + e)^2 - a^2*f*cos(f*x + e) - 2*a^2*f -
(a^2*f*cos(f*x + e) + 2*a^2*f)*sin(f*x + e))

________________________________________________________________________________________

giac [F(-2)]  time = 0.00, size = 0, normalized size = 0.00 \[ \text {Exception raised: NotImplementedError} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="giac")

[Out]

Exception raised: NotImplementedError >> Unable to parse Giac output: Unable to check sign: (4*pi/x/2)>(-4*pi/
x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check sign: (4*pi/x/2)>(-4*pi/x/2)Unable to check si
gn: (4*pi/x/2)>(-4*pi/x/2)2/f*(2*sqrt(a*tan((f*x+exp(1))/2)^2+a)*(-1/2*d^2/a/sign(tan((f*x+exp(1))/2)+1)+1/2*d
^2*tan((f*x+exp(1))/2)/a/sign(tan((f*x+exp(1))/2)+1))/(a*tan((f*x+exp(1))/2)^2+a)+2*(1/4*(-3*c^2*(-sqrt(a)*tan
((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^3-3*d^2*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1)
)/2)^2+a))^3+6*c*d*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^3+a*c^2*(-sqrt(a)*tan((f*x+e
xp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))+a*d^2*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a)
)+sqrt(a)*c^2*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^2+sqrt(a)*d^2*(-sqrt(a)*tan((f*x+
exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^2-2*a*c*d*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)
^2+a))-2*sqrt(a)*c*d*(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^2+sqrt(a)*a*c^2+sqrt(a)*a*
d^2-2*sqrt(a)*a*c*d)/(-(-sqrt(a)*tan((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))^2+2*sqrt(a)*(-sqrt(a)*ta
n((f*x+exp(1))/2)+sqrt(a*tan((f*x+exp(1))/2)^2+a))+a)^2/a/sign(tan((f*x+exp(1))/2)+1)+1/4*(c^2-7*d^2+6*c*d)*at
an((-sqrt(a)*tan((f*x+exp(1))/2)-sqrt(a)+sqrt(a*tan((f*x+exp(1))/2)^2+a))/sqrt(2)/sqrt(-a))/sqrt(2)/sqrt(-a)/a
/sign(tan((f*x+exp(1))/2)+1)))

________________________________________________________________________________________

maple [B]  time = 1.01, size = 316, normalized size = 2.29 \[ -\frac {\left (\sin \left (f x +e \right ) \left (\sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \,c^{2}+6 \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a c d -7 \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \,d^{2}+8 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, d^{2}\right )+\sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \,c^{2}+6 \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a c d -7 \sqrt {2}\, \arctanh \left (\frac {\sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {2}}{2 \sqrt {a}}\right ) a \,d^{2}+2 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, c^{2}-4 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, c d +10 \sqrt {a -a \sin \left (f x +e \right )}\, \sqrt {a}\, d^{2}\right ) \sqrt {-a \left (\sin \left (f x +e \right )-1\right )}}{4 a^{\frac {5}{2}} \cos \left (f x +e \right ) \sqrt {a +a \sin \left (f x +e \right )}\, f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^(3/2),x)

[Out]

-1/4/a^(5/2)*(sin(f*x+e)*(2^(1/2)*arctanh(1/2*(a-a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1/2))*a*c^2+6*2^(1/2)*arctanh(
1/2*(a-a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1/2))*a*c*d-7*2^(1/2)*arctanh(1/2*(a-a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1/2)
)*a*d^2+8*(a-a*sin(f*x+e))^(1/2)*a^(1/2)*d^2)+2^(1/2)*arctanh(1/2*(a-a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1/2))*a*c^
2+6*2^(1/2)*arctanh(1/2*(a-a*sin(f*x+e))^(1/2)*2^(1/2)/a^(1/2))*a*c*d-7*2^(1/2)*arctanh(1/2*(a-a*sin(f*x+e))^(
1/2)*2^(1/2)/a^(1/2))*a*d^2+2*(a-a*sin(f*x+e))^(1/2)*a^(1/2)*c^2-4*(a-a*sin(f*x+e))^(1/2)*a^(1/2)*c*d+10*(a-a*
sin(f*x+e))^(1/2)*a^(1/2)*d^2)*(-a*(sin(f*x+e)-1))^(1/2)/cos(f*x+e)/(a+a*sin(f*x+e))^(1/2)/f

________________________________________________________________________________________

maxima [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (d \sin \left (f x + e\right ) + c\right )}^{2}}{{\left (a \sin \left (f x + e\right ) + a\right )}^{\frac {3}{2}}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))^2/(a+a*sin(f*x+e))^(3/2),x, algorithm="maxima")

[Out]

integrate((d*sin(f*x + e) + c)^2/(a*sin(f*x + e) + a)^(3/2), x)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {{\left (c+d\,\sin \left (e+f\,x\right )\right )}^2}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((c + d*sin(e + f*x))^2/(a + a*sin(e + f*x))^(3/2),x)

[Out]

int((c + d*sin(e + f*x))^2/(a + a*sin(e + f*x))^(3/2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\left (c + d \sin {\left (e + f x \right )}\right )^{2}}{\left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((c+d*sin(f*x+e))**2/(a+a*sin(f*x+e))**(3/2),x)

[Out]

Integral((c + d*sin(e + f*x))**2/(a*(sin(e + f*x) + 1))**(3/2), x)

________________________________________________________________________________________